<?php

use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use app\assets\CropperAsset;
use app\models\Helpers;
use app\modules\clinical\models\ExcelEt;

/* @var $this yii\web\View */
/* @var $model app\models\ExcelPd */
/* @var $form yii\widgets\ActiveForm */

CropperAsset::register($this);
$this->registerCssFile("/css/cropper.css");
$this->registerJsFile("/js/pic.js", ['depends' => 'yii\web\JqueryAsset']);
$this->registerJsFile('@web/js/excel.js?v=1', ['depends' => 'app\assets\AppAsset']);


$pic = Helpers::checkExist("excel_et");


?>

    <h3>震颤评定量表：</h3>
    
    <div>
        0-3评分标准：<br />
        0无震颤<br />
        1轻度，幅度较小的震颤，不易察觉或间歇性出现<br />
        2中度，震颤幅度在1-2cm并持续性存在；活动时存在明显振动。<br />
        3重度，震颤幅度>2cm；激烈急促的震颤，导致难以完成活动，将水洒出，或不能用笔在纸上书写。
    </div>

    <br />
    <div class="form-group">
      <?= Html::label('患者姓名', 'pt_rel') ?><br />
      <?= Html::dropDownList('pt_rel', (!empty($pt_rel)) ? $pt_rel : 0, $pt_rel_list, ($model->isNewRecord) ? ['class' => 'pt_rel_list'] : ['class' => 'pt_rel_list', 'disabled' => 'true']) ?>
    </div>

    <div class="form-group">
        <?= Html::label('评估时间', 'evaluation_time') ?><br />
        <?= Html::textInput('evaluation_time', empty($evaluation_time) ? '' : $evaluation_time, ['class'=>'form-control laydate-icon date']) ?>
    </div>

    <h4>是否饮酒,若饮酒,饮酒后震颤是否缓解：</h4>

    <?= $form->field($model, 'yinjiu')->radioList(ExcelEt::getParams('shifou'), ['class'=>'radioList'])->error(false) ?><br />
    <?= $form->field($model, 'yinjiuzhenchan')->radioList(ExcelEt::getParams('shifou'), ['class'=>'radioList'])->error(false) ?>

    <h4>姿势性震颤（手平举）：</h4>

    <?= $form->field($model, 'zishi_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'zishi_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>指鼻试验：</h4>

    <?= $form->field($model, 'zhibi_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'zhibi_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>画阿基米德螺旋线（画在背面，标明左右手）：</h4>

    <?= $form->field($model, 'ajimi_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'ajimi_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>倒水：</h4>

    <?= $form->field($model, 'daoshui_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'daoshui_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>使用勺子：</h4>

    <?= $form->field($model, 'shaozi_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'shaozi_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>喝水：</h4>

    <?= $form->field($model, 'heshui_l')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <?= $form->field($model, 'heshui_r')->listBox(['0', '1', '2', '3'])->error(false) ?>

    <h4>总分：<span id="totalScore">0</span></h4>

    <?= $form->field($model, 'pianzhongce')->radioList(ExcelEt::getParams('zuoyou'), ['class'=>'radioList'])->error(false) ?>

    <br />

    <?= $form->field($model, 'guanyongshou')->radioList(ExcelEt::getParams('zuoyou'), ['class'=>'radioList'])->error(false) ?>
    
    <?= $form->field($model, 'zcleixing')->checkboxList(ExcelEt::getParams('zcLeixing'),['class' => 'checkBox']) ?><br />

    <div class="crop-avatar">
        <b>画阿基米德螺旋线：</b>
        <?= HTML::button('添加图片', ['class' => 'btn btn-default avatar-view']) ?>
        <?= HTML::a('查看图片', $pic['href'], ['class' => 'btn btn-default', 'target' => '_blank']) ?>
        <input type="hidden" id="pic-name" value="excel_et">
        <img <?= $pic['name'] ?> id="upload-pic">
    </div><br />
    
